package com.yenlien.traceyun.control.entity;


import com.yenlien.traceyun.webase.entity.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.*;
import java.awt.*;
import java.util.Date;

/**
 * 科技服务信息
 */
@Entity
@Table(name = "t_science_info")
@Data
public class ScienceInfo extends BaseEntity {

    @Column(name = "title_name", length = 20)
    private String titleName;           //文本标题

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Column(name = "create_time")
    @Temporal(TemporalType.TIMESTAMP)
    private Date createTime;            //创建时间

    @Column(name = "content")
    private String content;         //文本内容

    @Column(name = "img_path")
    private String imgPath;         //图片路径

    @Column(name = "second_id", length = 255)
    private String secondId;            //关联 二级分类id /  如果没有就是一级分类id

    @Transient
    private String topName;     //一级分类名

    @Transient
    private String topId;       //一级分类id

    @Transient
    private String secondName;          //二级分类名

}
